//
//  Proxy.h
//  DialectShare
//
//  Created by timmy zhong on 3/20/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Const.h"
@class Proxy;

@protocol ProxyDelegate <NSObject>
- (void)requestFinishWithProxy:(Proxy *)proxy;
- (void)requestFailWithProxy:(Proxy *)proxy;

@end

@interface Proxy : NSObject <UIAlertViewDelegate>
@property (nonatomic, retain) NSObject *object;
@property (nonatomic, assign) NSObject <ProxyDelegate>* delegate;

- (BOOL)connectToNetwork;
- (NSString *)fetchDataForUrlString:(NSString *)url;
- (NSString *)postData:(NSDictionary *)data files:(NSDictionary *)files url:(NSString *)url;

- (NSDictionary *)parse:(NSString *)data;
+ (BOOL)isExistenceNetwork;

@end




